import wx


class MyFrame(wx.Frame):
    def __init__(self, parent, id):
        wx.Frame.__init__(self, parent, id, title='xxx', pos=(100, 100), size=(1000, 618))
        panel = wx.Panel(self)
        title = wx.StaticText(panel, label='Action In Python', pos=(100, 20))
        font = wx.Font(16, wx.DEFAULT, wx.FONTSTYLE_NORMAL, wx.NORMAL)
        title.SetFont(font)

        self.text_user = wx.TextCtrl(panel, pos=(100, 50), style=wx.TE_LEFT)
        self.text_pwd = wx.TextCtrl(panel, pos=(100, 90), style=wx.TE_LEFT)

        self.bt_confirm = wx.Button(panel, label='OK', pos=(105, 130))
        self.bt_confirm = wx.Button(panel, label='Cancle', pos=(195, 130))

        self.bt_confirm.Bind(wx.EVT_BUTTON, self.OnclickSubmit)

    def OnclickSubmit(self, event):
        message = ''
        uname = self.text_user.GetValue()
        pwd = self.text_pwd.GetValue()

        wx.MessageBox(uname + " | " + pwd)


if __name__ == '__main__':
    app = wx.App()
    frame = MyFrame(parent=None, id=-1)
    frame.Show()
    app.MainLoop()
